package com.dwxt.sport.exception;

import com.dwxt.common.base.BaseResult;
import com.dwxt.common.base.StatusCode;


/**
 * 自定义异常
 *
 * @author Kuang.JiaZhuo
 * @date 2020-07-24 16:30
 */
public class CustomException extends RuntimeException {

    private BaseResult baseResult;

    public CustomException(StatusCode statusCode) {
        this.baseResult = BaseResult.build(statusCode);
    }

    public CustomException(BaseResult baseResult) {
        this.baseResult = baseResult;
    }

    public BaseResult getBaseResult() {
        return baseResult;
    }
}
